<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>My JSP 'index.jsp' starting page</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="shortcut icon" href="favicon.ico" />
		<script src="js/Calendar.js" type="text/javascript"></script>
		<script type="text/javascript">
		   function verification()
		   {
		   		var title = document.getElementById("Promotiontitle").value;
		   		var bt = document.getElementById("begintime").value;
		   		var et = document.getElementById("endtime").value;
		   		if(title == "")
		   		{
		   			alert("请输入促销名称");
		   			return false;
		   		}
		   		if(bt == "")
		   		{
		   			alert("请输入促销开始时间");
		   			return false;
		   		}
		   		if(et == "")
		   		{
		   			alert("请输入促销结束时间");
		   			return false;
		   		}
		   }
		   
		   function sub()
		   {
		   		myform.submit();
		   }
		</script>
	</head>
	<body style="text-align: center;margin: 0" bgcolor=#eaf4fe>
		<form id="myform" method="post" action="StepTwo"
			onsubmit="return verification()">
		</form>
		<%
			String username = (String) request.getAttribute("name");
			String title = (String) request.getAttribute("title");
		%>
		<div align="center"
			style="background-color: #465461; font-size: 20; width: 70%">
			<img alt="" src="images/test.jpg">
			欢迎您<%=username%>
		</div>
		<div style="height: 2"></div>
		<!--  -->
		<div align="center"
			style="height: 80%; width: 70%; background: #f3f3f3; padding: 0px; margin: 0px auto;">
			<div align="center"
				style="background: red; padding: 0px; margin: 0px auto;">
				<div id="home" align="center"
					style="border: 1px solid #ccc; border-right: none; border-top: none; background: #619dd7; width: 20%; height: 40; margin: 0px; padding: 0px; float: left; line-height: 40px;">
					首页
				</div>
				<div id="stepone" align="center"
					style="border: 1px solid #ccc; border-right: none; border-top: none; background: f9f8f8; width: 20%; height: 40; margin: 0px; padding: 0px; float: left; line-height: 40px;">
					创建新活动
				</div>
				<div id="steptwo" align="center"
					style="border: 1px solid #ccc; border-right: none; border-top: none; background: #619dd7; width: 20%; height: 40; margin: 0px; padding: 0px; float: left; line-height: 40px;">
					折扣专区
				</div>
				<div id="stepthree" align="right"
					style="border: 1px solid #ccc; background: #619dd7; border-top: none;; width: 40%; height: 40; margin: 0px; padding: 0px; float: left; line-height: 40px;">
					<a href="http://www.baidu.com">帮助</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				</div>
			</div>

			<div style="height: 2"></div>
			<div>
				<img src="images/title.jpg">
			</div>
			<div style="height: 2"></div>
			<div id="body" style="height: 500px" align="center">
				<table border="0" width="60%" align="center">
					<tr>
						<td colspan="2" align="left">
							<font size="5">填写你要创建的活动信息</font>
						</td>
					</tr>
					<tr>
						<td>
							活动名称:
						</td>
						<td>
							<input type="text" name="Promotiontitle" id="Promotiontitle"
								value=<%=title %>>
							&nbsp;
							<label>
								长度为2到30个汉字
							</label>
						</td>
					</tr>
					<tr>
						<td>
							开始时间:
						</td>
						<td>
							<input onfocus="calendar()" name="begintime" type="text"
								id="begintime">
							<select name="discountbegintime" id="discountbegintime">
								<%
								for (int i = 1; i < 25; i++)
								{
							%>
								<option value=<%=i%>>
									<%=i%>:00
								</option>
								<%
								}
							%>
							</select>
						</td>
					</tr>
					<tr>
						<td>
							结束时间:
						</td>
						<td>
							<input onfocus="calendar()" name="endtime" type="text"
								id="endtime">
							<select name="discountendtime" id="discountendtime">
								<%
								for (int i = 1; i < 25; i++)
								{
							%>
								<option value=<%=i%>>
									<%=i%>:00
								</option>
								<%
								}
							%>
							</select>
						</td>
					</tr>

					<tr>
						<td>
							价格标签:
						</td>
						<td>
							<select name="discountendtime" id="discountendtime">
								<%
								for (int i = 1; i < 25; i++)
								{
							%>
								<option value=<%=i%>>
									<%=i%>:00
								</option>
								<%
								}
							%>
							</select>
						</td>
					</tr>
					<tr>
						<td>
							商品分类:
						</td>
						<td>
							<select name="discountendtime" id="discountendtime">
								<%
								for (int i = 1; i < 25; i++)
								{
							%>
								<option value=<%=i%>>
									<%=i%>:00
								</option>
								<%
								}
							%>
							</select>
						</td>
					</tr>

					<tr>
						<td colspan="2" align="center">
							<input type="button" onclick="sub()" value="下一步" />
						</td>
					</tr>

				</table>
			</div>
		</div>
		<!--  -->
		<div align="center" id="bottom"
			style="background-color: #eaf4fe; width: 70%; line-height: 20px;">
			<font color="#808080"> Copyright (C) 2012-2013 www.qidian.com
				All Rights Reserved 版权所有</font>
		</div>
	</body>
</html>
